/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package net.octopeer.core.config;

import net.octopeer.core.Peer;
import net.octopeer.core.PeerNode;

/**
 *
 * @author andria
 */
public class PeerNodeConfig {
    
    public PeerNodeConfig() {
        //
    }
    
    public PeerNode readPeerNodeConfig() throws Exception {
        PeerNode peerNode = new PeerNode();
        
        peerNode = peerNode.fromXMLFile("./conf/peerNode.xml");
        
        return peerNode;
    }
    
    public void updatePeerNodeConfig(Peer peer) throws Exception {
        peer.getNode().toXMLFile("./conf/peerNode.xml");
    }
}
